<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>


<form class="registration-form" method="POST" action="/cn/register.action" onsubmit="customOnsubmit(); return validateForm_registration_form();" name="register" id="registration_form" namespace="/cn">
    <h1 style="height: 0pt;">&nbsp;</h1>

    <fieldset style="display: none;">
        <legend>社区</legend>
        <p class="registration-notes">
            <spring:message code="message.registration.notes"/>
        </p>
        <p>
            <label for="form-java">
                <input type="checkbox" id="form-java" checked="checked" value="java" name="communities">
                <strong>Java</strong><spring:message code="message.registration.notes.java"/>
            </label>
        </p>
        <p>
            <label for="form-dotnet">
                <input type="checkbox" id="form-dotnet" checked="checked" value="dotnet" name="communities">
                <strong>.NET</strong><spring:message code="message.registration.notes.dotnet"/>
            </label>
        </p>
        <p>
            <label for="form-soa">
                <input type="checkbox" id="form-soa" checked="checked" value="soa" name="communities">
                <strong>SOA</strong><spring:message code="message.registration.notes.soa"/>
            </label>
        </p>
        <p>
            <label for="form-agile">
                <input type="checkbox" id="form-agile" checked="checked" value="agile" name="communities">
                <strong>敏捷</strong><spring:message code="message.registration.notes.agile"/>
            </label>
        </p>
        <p>
            <label for="form-architecture">
                <input type="checkbox" id="form-architecture" checked="checked" value="architecture" name="communities">
                <strong>架构 </strong><spring:message code="message.registration.notes.architecture"/>
            </label>
        </p>
        <div>
            <div>
                <div id="communities.error"></div>
            </div>
        </div>
    </fieldset>

    <fieldset>
        <legend>
            <spring:message code="message.user.login"/>
        </legend>
        <p>
            <label for="register_model_email">
                <span class="required">*</span>
                <spring:message code="message.registration.notes.email"/>
            </label>
        </p>
        <div class="wwgrp" id="wwgrp_register_model_email">
            <div class="wwctrl" id="wwctrl_register_model_email">
                <input type="text" onBlur="checkMailAsync(this.value);" class="registration-formtext" id="register_model_email" value="" name="model.email">
            </div>
        </div>
        <span style="color: rgb(221, 0, 0);" id="mailMessage"></span>
        <p>
            <label for="register_model_password">
                <span class="required">*</span><spring:message code="message.user.password"/>
            </label>
        </p>
        <div class="wwgrp" id="wwgrp_register_model_password">
            <div class="wwctrl" id="wwctrl_register_model_password">
                <input type="password" onBlur="identicalPasswords(this);" class="registration-formtext" id="register_model_password" name="model.password">
            </div>
        </div>
        <p>
            <label for="register_confirmedPassword">
                <span class="required">*</span><spring:message code="message.user.confirmed_password"/>
            </label>
        </p>
        <div class="wwgrp" id="wwgrp_register_confirmedPassword">
            <div class="wwctrl" id="wwctrl_register_confirmedPassword">
                <input type="password" onBlur="identicalPasswords(this);" class="registration-formtext" id="register_confirmedPassword" name="confirmedPassword">
            </div>
        </div>
        <span style="color: rgb(221, 0, 0);" id="passwordMessage"></span>
        <p>
            <label for="register_model_firstName">
                <span class="required">*</span><spring:message code="message.user.firstname"/>
            </label>
        </p>
        <div class="wwgrp" id="wwgrp_register_model_firstName">
            <div class="wwctrl" id="wwctrl_register_model_firstName">
                <input type="text" class="registration-formtext" id="register_model_firstName" value="" name="model.firstName">
            </div>
        </div>
        <p>
            <label for="register_model_lastName">
                <span class="required">*</span><spring:message code="message.user.lastname"/>
            </label>
        </p>
        <div class="wwgrp" id="wwgrp_register_model_lastName">
            <div class="wwctrl" id="wwctrl_register_model_lastName">
                <input type="text" class="registration-formtext" id="register_model_lastName" value="" name="model.lastName">
            </div>
        </div>
    </fieldset>

    <fieldset>
        <legend><spring:message code="message.registration.homeland"/></legend>
        <p class="registration-notes">
            <a href="#">InfoQ.com</a><spring:message code="message.registration.notes.homeland"/>
        </p>
        <p>
            <label for="countryId">
                <span class="required">*</span><spring:message code="message.registration.notes.countries_or_regions"/>
            </label>
        </p>
        <div class="wwgrp" id="wwgrp_countryId">
            <div class="wwctrl" id="wwctrl_countryId">
                <select onChange="updateStates();" id="countryId" name="countryId">
                    <option value="-1000">--- Select a country ---</option>
                </select>
            </div>
        </div>
        <p>
            <label for="stateId">
                <span class="required">*</span>
                <spring:message code="message.registration.notes.states_or_province"/>
            </label>
        </p>
        <div>
            <div>
                <div id="states.error"></div>
            </div>
        </div>
        <select id="stateId" name="stateId">
        </select>
    </fieldset>

    <div class="clearer"></div>

    <input type="submit" id="submitButton" value="<spring:message code="message.form.commit"/>">
    <span style="color: rgb(221, 0, 0);" id="submitMessage"></span>
</form>